Repository navigation
feat(extraction): index ArkTS (.ets) at the extraction tier - #149
Merged
Merged
Conversation
Ports the extraction half of upstream colby ArkTS support (#1186). ArkTS is HarmonyOS's TypeScript superset; the dedicated tree-sitter-arkts grammar parses its ArkUI `struct` components, which plain tree-sitter-typescript cannot. `.ets` files now index their functions, classes, ArkUI `struct` components, methods, imports, and call edges as a first-class Tier-1 language. Adds the `Language::ArkTs` variant, the `.ets` extension mapping, an `ARKTS_SPEC` cloned from the TypeScript spec with `struct_declaration` mapped to a struct symbol, the `tree-sitter-arkts = "0.2.0"` crates.io grammar (no vendored grammar), and a dedicated arkts golden fixture. The store's language parser learns "arkts" so indexing an `.ets` file round-trips through the DB. The ArkUI dispatch bridges from the upstream commit — the callback synthesizer, @Component/@Builder/@Styles attribute-chain resolution, state->build() re-render edges, the ohpm workspace-package import resolver, and the decorator hook that feeds them — are deferred: this port has no callback-synthesis subsystem, and those bridges are the same non-Godot framework-resolution machinery it already leaves out. ArkTS joins at the same extraction tier as the other 24 Tier-1 languages. The language enum is stored as a TEXT value, not DDL, so the golden .schema is unchanged and the six existing golden fixtures are byte-identical (no regen); only the new arkts fixture is added.
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (84.18%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage. @@ Coverage Diff @@
## main #149 +/- ##
==========================================
- Coverage 95.53% 95.49% -0.05%
==========================================
Files 118 119 +1
Lines 58200 58414 +214
==========================================
+ Hits 55603 55784 +181
- Misses 2597 2630 +33
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upstream-sync DEFER item H1 — adds ArkTS (.ets) as a first-class Tier-1 extraction language (colby #1186, extraction half). ArkTS is HarmonyOS's TypeScript superset; the dedicated
tree-sitter-arkts = "0.2.0"grammar parses its ArkUIstructcomponents (plaintree-sitter-typescriptcan't)..etsfiles now index functions, classes, ArkUIstructcomponents, methods, imports, and call edges.Language::ArkTsvariant +.etsmapping;ARKTS_SPECcloned from TypeScript withstruct_declaration→ struct symbol;tree-sitter-arktspinned from crates.io (no vendored grammar); storeparse_languagelearns"arkts"; dedicatedarktsgolden fixture.Deferred (recorded, not built): the ArkUI dispatch bridges from the upstream commit — callback synthesizer,
@Component/@Builder/@Stylesattribute-chain resolution, state→build()re-render edges, the ohpm workspace-package import resolver, and the decorator hook. This port has no callback-synthesis subsystem, and these are the same non-Godot framework-resolution machinery it already leaves out. ArkTS joins at the extraction tier like the other 24 Tier-1 languages.Verification
make cigreen (fmt + clippy + test + guardrail);cargo test --workspace0 failed.arkts_extension_maps_to_arkts,plain_ts_stays_typescript,arkts_extracts_struct_function_class_import_call, enum round-trip at 37,arktsgolden self-equivalence + committed-match,schema_paritygreen..schemaunchanged (language is a stored TEXT value, not DDL).Cargo.lockgains onlytree-sitter-arkts.DEFER item H1 of the 1.2.0→1.4.1 upstream sync. Remaining: Solidity, Nix, HCL/Terraform, Erlang, CFML (gated); COBOL + VB.NET deferred (no crates.io grammar).